package gocloak

Import Path
	github.com/Nerzal/gocloak/v13 (on go.dev)

Dependency Relation
	imports 17 packages, and imported by one package

Involved Source Files Package gocloak is a golang keycloak adaptor. errors.go models.go token.go utils.go
Package-Level Type Names (total 116)
/* sort by: | */
Access represents access Impersonate *bool Manage *bool ManageGroupMembership *bool MapRoles *bool View *bool (*Access) String() string *Access : github.com/ChrisTrenkamp/goxpath/tree.Result *Access : fmt.Stringer
AccessRepresentation represents the access parameters returned in the permission ticket description Impersonate *bool Manage *bool ManageGroupMembership *bool MapRoles *bool View *bool (*AccessRepresentation) String() string *AccessRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *AccessRepresentation : fmt.Stringer
ActiveKeys holds the active keys AES *string HS256 *string RS256 *string (*ActiveKeys) String() string *ActiveKeys : github.com/ChrisTrenkamp/goxpath/tree.Result *ActiveKeys : fmt.Stringer
AdapterConfiguration represents adapter configuration of a client AuthServerURL *string ConfidentialPort *int Credentials interface{} Realm *string Resource *string SSLRequired *string func (*GoCloak).GetAdapterConfiguration(ctx context.Context, accessToken, realm, clientID string) (*AdapterConfiguration, error)
AggregatedPolicyRepresentation represents aggregated policies Policies *[]string (*AggregatedPolicyRepresentation) String() string *AggregatedPolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *AggregatedPolicyRepresentation : fmt.Stringer
APIError holds message and statusCode for api errors Code int Message string Type APIErrType Error stringifies the APIError APIError : error
APIErrType is a field containing more specific API error types that may be checked by the receiver. func ParseAPIErrType(err error) APIErrType const APIErrTypeUnknown
Attributes holds Attributes LDAPENTRYDN *[]string LDAPID *[]string (*Attributes) String() string *Attributes : github.com/ChrisTrenkamp/goxpath/tree.Result *Attributes : fmt.Stringer
AuthenticationExecutionRepresentation represents the authentication execution of an AuthenticationFlowRepresentation Authenticator *string AuthenticatorConfig *string AuthenticatorFlow *bool AutheticatorFlow *bool FlowAlias *string Priority *int Requirement *string UserSetupAllowed *bool
AuthenticationFlowRepresentation represents an authentication flow of a realm Alias *string AuthenticationExecutions *[]AuthenticationExecutionRepresentation BuiltIn *bool Description *string ID *string ProviderID *string TopLevel *bool func (*GoCloak).GetAuthenticationFlow(ctx context.Context, token, realm string, authenticationFlowID string) (*AuthenticationFlowRepresentation, error) func (*GoCloak).GetAuthenticationFlows(ctx context.Context, token, realm string) ([]*AuthenticationFlowRepresentation, error) func (*GoCloak).UpdateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation, authenticationFlowID string) (*AuthenticationFlowRepresentation, error) func (*GoCloak).CreateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation) error func (*GoCloak).UpdateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation, authenticationFlowID string) (*AuthenticationFlowRepresentation, error)
AuthorizationParameters represents the options to obtain get an authorization ClientID *string IDTokenHint *string Nonce *string RedirectURI *string ResponseType *string Scope *string State *string FormData returns a map of options to be used in SetFormData function
AuthorizationResponse represents the response to an authorization request.
BruteForceStatus is a representation of realm user regarding brute force attack Disabled *bool LastFailure *int LastIPFailure *string NumFailures *int (*BruteForceStatus) String() string *BruteForceStatus : github.com/ChrisTrenkamp/goxpath/tree.Result *BruteForceStatus : fmt.Stringer func (*GoCloak).GetUserBruteForceDetectionStatus(ctx context.Context, accessToken, realm, userID string) (*BruteForceStatus, error)
BuiltinProtocolMappers holds the currently available built-in blueprints of ProtocolMapper-s grouped by protocol OpenIDConnect []ProtocolMapperRepresentation SAML []ProtocolMapperRepresentation
CertResponse is returned by the certs endpoint Keys *[]CertResponseKey (*CertResponse) String() string *CertResponse : github.com/ChrisTrenkamp/goxpath/tree.Result *CertResponse : fmt.Stringer func (*GoCloak).GetCerts(ctx context.Context, realm string) (*CertResponse, error)
CertResponseKey is returned by the certs endpoint. JSON Web Key structure is described here: https://self-issued.info/docs/draft-ietf-jose-json-web-key.html#JWKContents Alg *string Crv *string E *string KeyOps *[]string Kid *string Kty *string N *string Use *string X *string X5c *[]string X5t *string X5tS256 *string X5u *string Y *string Stringer implementations for all struct types *CertResponseKey : github.com/ChrisTrenkamp/goxpath/tree.Result *CertResponseKey : fmt.Stringer
Client is a ClientRepresentation Access *map[string]interface{} AdminURL *string Attributes *map[string]string AuthenticationFlowBindingOverrides *map[string]string AuthorizationServicesEnabled *bool AuthorizationSettings *ResourceServerRepresentation BaseURL *string BearerOnly *bool ClientAuthenticatorType *string ClientID *string ConsentRequired *bool DefaultClientScopes *[]string DefaultRoles *[]string Description *string DirectAccessGrantsEnabled *bool Enabled *bool FrontChannelLogout *bool FullScopeAllowed *bool ID *string ImplicitFlowEnabled *bool Name *string NodeReRegistrationTimeout *int32 NotBefore *int32 OptionalClientScopes *[]string Origin *string Protocol *string ProtocolMappers *[]ProtocolMapperRepresentation PublicClient *bool RedirectURIs *[]string RegisteredNodes *map[string]int RegistrationAccessToken *string RootURL *string Secret *string ServiceAccountsEnabled *bool StandardFlowEnabled *bool SurrogateAuthRequired *bool WebOrigins *[]string (*Client) String() string *Client : github.com/ChrisTrenkamp/goxpath/tree.Result *Client : fmt.Stringer func (*GoCloak).CreateClientRepresentation(ctx context.Context, token, realm string, newClient Client) (*Client, error) func (*GoCloak).GetClient(ctx context.Context, token, realm, idOfClient string) (*Client, error) func (*GoCloak).GetClientRepresentation(ctx context.Context, accessToken, realm, clientID string) (*Client, error) func (*GoCloak).GetClients(ctx context.Context, token, realm string, params GetClientsParams) ([]*Client, error) func (*GoCloak).UpdateClientRepresentation(ctx context.Context, accessToken, realm string, updatedClient Client) (*Client, error) func (*GoCloak).CreateClient(ctx context.Context, accessToken, realm string, newClient Client) (string, error) func (*GoCloak).CreateClientRepresentation(ctx context.Context, token, realm string, newClient Client) (*Client, error) func (*GoCloak).UpdateClient(ctx context.Context, token, realm string, updatedClient Client) error func (*GoCloak).UpdateClientRepresentation(ctx context.Context, accessToken, realm string, updatedClient Client) (*Client, error)
ClientMappingsRepresentation is a client role mappings Client *string ID *string Mappings *[]Role (*ClientMappingsRepresentation) String() string *ClientMappingsRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ClientMappingsRepresentation : fmt.Stringer
ClientPolicyRepresentation represents client based policies Clients *[]string (*ClientPolicyRepresentation) String() string *ClientPolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ClientPolicyRepresentation : fmt.Stringer
ClientScope is a ClientScope ClientScopeAttributes *ClientScopeAttributes Description *string ID *string Name *string Protocol *string ProtocolMappers *[]ProtocolMappers (*ClientScope) String() string *ClientScope : github.com/ChrisTrenkamp/goxpath/tree.Result *ClientScope : fmt.Stringer func (*GoCloak).GetClientScope(ctx context.Context, token, realm, scopeID string) (*ClientScope, error) func (*GoCloak).GetClientScopes(ctx context.Context, token, realm string) ([]*ClientScope, error) func (*GoCloak).GetClientsDefaultScopes(ctx context.Context, token, realm, idOfClient string) ([]*ClientScope, error) func (*GoCloak).GetClientsOptionalScopes(ctx context.Context, token, realm, idOfClient string) ([]*ClientScope, error) func (*GoCloak).GetDefaultDefaultClientScopes(ctx context.Context, token, realm string) ([]*ClientScope, error) func (*GoCloak).GetDefaultOptionalClientScopes(ctx context.Context, token, realm string) ([]*ClientScope, error) func (*GoCloak).CreateClientScope(ctx context.Context, token, realm string, scope ClientScope) (string, error) func (*GoCloak).UpdateClientScope(ctx context.Context, token, realm string, scope ClientScope) error
ClientScopeAttributes are attributes of client scopes ConsentScreenText *string DisplayOnConsentScreen *string IncludeInTokenScope *string (*ClientScopeAttributes) String() string *ClientScopeAttributes : github.com/ChrisTrenkamp/goxpath/tree.Result *ClientScopeAttributes : fmt.Stringer
Component is a component ComponentConfig *map[string][]string ID *string Name *string ParentID *string ProviderID *string ProviderType *string SubType *string (*Component) String() string *Component : github.com/ChrisTrenkamp/goxpath/tree.Result *Component : fmt.Stringer func (*GoCloak).GetComponent(ctx context.Context, token, realm string, componentID string) (*Component, error) func (*GoCloak).GetComponents(ctx context.Context, token, realm string) ([]*Component, error) func (*GoCloak).GetComponentsWithParams(ctx context.Context, token, realm string, params GetComponentsParams) ([]*Component, error) func (*GoCloak).CreateComponent(ctx context.Context, token, realm string, component Component) (string, error) func (*GoCloak).UpdateComponent(ctx context.Context, token, realm string, component Component) error
CompositesRepresentation represents the composite roles of a role Client *map[string][]string Realm *[]string (*CompositesRepresentation) String() string *CompositesRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *CompositesRepresentation : fmt.Stringer
CreateAuthenticationExecutionFlowRepresentation contains the provider to be used for a new authentication representation Alias *string Description *string Provider *string Type *string func (*GoCloak).CreateAuthenticationExecutionFlow(ctx context.Context, token, realm, flow string, executionFlow CreateAuthenticationExecutionFlowRepresentation) error
CreateAuthenticationExecutionRepresentation contains the provider to be used for a new authentication representation Provider *string func (*GoCloak).CreateAuthenticationExecution(ctx context.Context, token, realm, flow string, execution CreateAuthenticationExecutionRepresentation) error
CreatePermissionTicketParams represents the optional parameters for getting a permission ticket Claims *map[string][]string ResourceID *string ResourceScopes *[]string (*CreatePermissionTicketParams) String() string *CreatePermissionTicketParams : github.com/ChrisTrenkamp/goxpath/tree.Result *CreatePermissionTicketParams : fmt.Stringer func (*GoCloak).CreatePermissionTicket(ctx context.Context, token, realm string, permissions []CreatePermissionTicketParams) (*PermissionTicketResponseRepresentation, error)
CredentialRepresentation is a representations of the credentials v7: https://www.keycloak.org/docs-api/7.0/rest-api/index.html#_credentialrepresentation v8: https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_credentialrepresentation <= v7 Config *MultiValuedHashMap Counter *int32 Common part >= v8 Device *string Digits *int32 HashIterations *int32 HashedSaltedValue *string ID *string Period *int32 Priority *int32 Salt *string SecretData *string Temporary *bool Type *string UserLabel *string Value *string (*CredentialRepresentation) String() string *CredentialRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *CredentialRepresentation : fmt.Stringer func (*GoCloak).GetClientSecret(ctx context.Context, token, realm, idOfClient string) (*CredentialRepresentation, error) func (*GoCloak).GetCredentials(ctx context.Context, token, realm, userID string) ([]*CredentialRepresentation, error) func (*GoCloak).RegenerateClientSecret(ctx context.Context, token, realm, idOfClient string) (*CredentialRepresentation, error)
DecisionStrategy is an enum type for DecisionStrategy of PolicyRepresentation func DecisionStrategyP(value DecisionStrategy) *DecisionStrategy func DecisionStrategyP(value DecisionStrategy) *DecisionStrategy var AFFIRMATIVE *DecisionStrategy var CONSENSUS *DecisionStrategy var UNANIMOUS *DecisionStrategy
EnforcedString can be used when the expected value is string but Keycloak in some cases gives you mixed types MarshalJSON return json marshal UnmarshalJSON modify data as string before json unmarshal *EnforcedString : encoding/json.Marshaler *EnforcedString : encoding/json.Unmarshaler
EventRepresentation is a representation of a Event ClientID *string Details map[string]string IPAddress *string RealmID *string SessionID *string Time int64 Type *string UserID *string func (*GoCloak).GetEvents(ctx context.Context, token string, realm string, params GetEventsParams) ([]*EventRepresentation, error)
ExecuteActionsEmail represents parameters for executing action emails Actions *[]string ClientID *string Lifespan *int RedirectURI *string UserID *string (*ExecuteActionsEmail) String() string *ExecuteActionsEmail : github.com/ChrisTrenkamp/goxpath/tree.Result *ExecuteActionsEmail : fmt.Stringer func (*GoCloak).ExecuteActionsEmail(ctx context.Context, token, realm string, params ExecuteActionsEmail) error
FederatedIdentityRepresentation represents an user federated identity IdentityProvider *string UserID *string UserName *string (*FederatedIdentityRepresentation) String() string *FederatedIdentityRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *FederatedIdentityRepresentation : fmt.Stringer func (*GoCloak).GetUserFederatedIdentities(ctx context.Context, token, realm, userID string) ([]*FederatedIdentityRepresentation, error) func (*GoCloak).CreateUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string, federatedIdentityRep FederatedIdentityRepresentation) error
GetClientsParams represents the query parameters ClientID *string First *int Max *int Search *bool SearchableAttributes *string ViewableOnly *bool (*GetClientsParams) String() string *GetClientsParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetClientsParams : fmt.Stringer func (*GoCloak).GetClients(ctx context.Context, token, realm string, params GetClientsParams) ([]*Client, error)
GetClientUserSessionsParams represents the optional parameters for getting user sessions associated with the client First *int Max *int (*GetClientUserSessionsParams) String() string *GetClientUserSessionsParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetClientUserSessionsParams : fmt.Stringer func (*GoCloak).GetClientOfflineSessions(ctx context.Context, token, realm, idOfClient string, params ...GetClientUserSessionsParams) ([]*UserSessionRepresentation, error) func (*GoCloak).GetClientUserSessions(ctx context.Context, token, realm, idOfClient string, params ...GetClientUserSessionsParams) ([]*UserSessionRepresentation, error)
GetComponentsParams represents the optional parameters for getting components Name *string ParentID *string ProviderType *string (*GetComponentsParams) String() string *GetComponentsParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetComponentsParams : fmt.Stringer func (*GoCloak).GetComponentsWithParams(ctx context.Context, token, realm string, params GetComponentsParams) ([]*Component, error)
GetEventsParams represents the optional parameters for getting events Client *string DateFrom *string DateTo *string First *int32 IPAddress *string Max *int32 Type []string UserID *string func (*GoCloak).GetEvents(ctx context.Context, token string, realm string, params GetEventsParams) ([]*EventRepresentation, error)
GetGroupsParams represents the optional parameters for getting groups BriefRepresentation *bool Exact *bool First *int Full *bool Max *int Q *string Search *string MarshalJSON is a custom json marshaling function to automatically set the Full and BriefRepresentation properties for backward compatibility (*GetGroupsParams) String() string *GetGroupsParams : github.com/ChrisTrenkamp/goxpath/tree.Result GetGroupsParams : encoding/json.Marshaler *GetGroupsParams : fmt.Stringer func (*GoCloak).GetGroupMembers(ctx context.Context, token, realm, groupID string, params GetGroupsParams) ([]*User, error) func (*GoCloak).GetGroups(ctx context.Context, token, realm string, params GetGroupsParams) ([]*Group, error) func (*GoCloak).GetGroupsCount(ctx context.Context, token, realm string, params GetGroupsParams) (int, error) func (*GoCloak).GetUserGroups(ctx context.Context, token, realm, userID string, params GetGroupsParams) ([]*Group, error)
GetPermissionParams represents the optional parameters for getting permissions First *int Max *int Name *string Resource *string Scope *string Type *string (*GetPermissionParams) String() string *GetPermissionParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetPermissionParams : fmt.Stringer func (*GoCloak).GetPermissions(ctx context.Context, token, realm, idOfClient string, params GetPermissionParams) ([]*PermissionRepresentation, error)
GetPolicyParams represents the optional parameters for getting policies TODO: more policy params? First *int Max *int Name *string Permission *bool Type *string (*GetPolicyParams) String() string *GetPolicyParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetPolicyParams : fmt.Stringer func (*GoCloak).GetPolicies(ctx context.Context, token, realm, idOfClient string, params GetPolicyParams) ([]*PolicyRepresentation, error)
GetResourceParams represents the optional parameters for getting resources Deep *bool ExactName *bool First *int MatchingURI *bool Max *int Name *string Owner *string Scope *string Type *string URI *string (*GetResourceParams) String() string *GetResourceParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetResourceParams : fmt.Stringer func (*GoCloak).GetResources(ctx context.Context, token, realm, idOfClient string, params GetResourceParams) ([]*ResourceRepresentation, error) func (*GoCloak).GetResourcesClient(ctx context.Context, token, realm string, params GetResourceParams) ([]*ResourceRepresentation, error)
GetResourcePoliciesParams is a representation of the query params for getting policies First *int Max *int Name *string ResourceID *string Scope *string (*GetResourcePoliciesParams) String() string *GetResourcePoliciesParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetResourcePoliciesParams : fmt.Stringer func (*GoCloak).GetResourcePolicies(ctx context.Context, token, realm string, params GetResourcePoliciesParams) ([]*ResourcePolicyRepresentation, error)
GetRoleParams represents the optional parameters for getting roles BriefRepresentation *bool First *int Max *int Search *string (*GetRoleParams) String() string *GetRoleParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetRoleParams : fmt.Stringer func (*GoCloak).GetClientRoles(ctx context.Context, token, realm, idOfClient string, params GetRoleParams) ([]*Role, error) func (*GoCloak).GetRealmRoles(ctx context.Context, token, realm string, params GetRoleParams) ([]*Role, error)
GetScopeParams represents the optional parameters for getting scopes Deep *bool First *int Max *int Name *string (*GetScopeParams) String() string *GetScopeParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetScopeParams : fmt.Stringer func (*GoCloak).GetScopes(ctx context.Context, token, realm, idOfClient string, params GetScopeParams) ([]*ScopeRepresentation, error)
GetUserPermissionParams represents the optional parameters for getting user permissions First *int Granted *bool Max *int Owner *string Requester *string ResourceID *string ReturnNames *string ScopeID *string (*GetUserPermissionParams) String() string *GetUserPermissionParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetUserPermissionParams : fmt.Stringer func (*GoCloak).GetUserPermissions(ctx context.Context, token, realm string, params GetUserPermissionParams) ([]*PermissionGrantResponseRepresentation, error)
GetUsersByRoleParams represents the optional parameters for getting users by role First *int Max *int (*GetUsersByRoleParams) String() string *GetUsersByRoleParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetUsersByRoleParams : fmt.Stringer func (*GoCloak).GetUsersByClientRoleName(ctx context.Context, token, realm, idOfClient, roleName string, params GetUsersByRoleParams) ([]*User, error) func (*GoCloak).GetUsersByRoleName(ctx context.Context, token, realm, roleName string, params GetUsersByRoleParams) ([]*User, error)
GetUsersParams represents the optional parameters for getting users BriefRepresentation *bool Email *string EmailVerified *bool Enabled *bool Exact *bool First *int FirstName *string IDPAlias *string IDPUserID *string LastName *string Max *int Q *string Search *string Username *string (*GetUsersParams) String() string *GetUsersParams : github.com/ChrisTrenkamp/goxpath/tree.Result *GetUsersParams : fmt.Stringer func (*GoCloak).GetUserCount(ctx context.Context, token string, realm string, params GetUsersParams) (int, error) func (*GoCloak).GetUsers(ctx context.Context, token, realm string, params GetUsersParams) ([]*User, error)
GoCloak provides functionalities to talk to Keycloak. Config struct{CertsInvalidateTime time.Duration; authAdminRealms string; authRealms string; tokenEndpoint string; revokeEndpoint string; logoutEndpoint string; openIDConnect string; attackDetection string} AddClientRoleComposite adds roles as composite AddClientRoleToGroup adds a client role to the group Deprecated: replaced by AddClientRolesToGroup AddClientRoleToUser adds client-level role mappings Deprecated: replaced by AddClientRolesToUser AddClientRolesToGroup adds a client role to the group AddClientRolesToUser adds client-level role mappings AddDefaultGroup adds group to the list of default groups AddDefaultScopeToClient adds a client scope to the list of client's default scopes AddOptionalScopeToClient adds a client scope to the list of client's optional scopes AddRealmRoleComposite adds a role to the composite. AddRealmRoleToGroup adds realm-level role mappings AddRealmRoleToUser adds realm-level role mappings AddUserToGroup puts given user to given group ClearKeysCache clears realm cache ClearRealmCache clears realm cache ClearUserCache clears realm cache CreateAuthenticationExecution creates a new execution for the given flow name in the given realm CreateAuthenticationExecutionFlow creates a new execution for the given flow name in the given realm CreateAuthenticationFlow creates a new Authentication flow in a realm CreateChildGroup creates a new child group CreateClient creates the given g. CreateClientProtocolMapper creates a protocol mapper in client scope CreateClientRepresentation creates a new client representation CreateClientRole creates a new role for a client CreateClientScope creates a new client scope CreateClientScopeMappingsClientRoles creates client-level roles from the client’s scope CreateClientScopeMappingsRealmRoles create realm-level roles to the client’s scope CreateClientScopeProtocolMapper creates a new protocolMapper under the given client scope CreateClientScopesScopeMappingsClientRoles attaches a client role to a client scope (not client's scope) CreateClientScopesScopeMappingsRealmRoles creates realm-level roles to the client scope CreateComponent creates the given component. CreateGroup creates a new group. CreateIdentityProvider creates an identity provider in a realm CreateIdentityProviderMapper creates an instance of an identity provider mapper associated with the given alias CreatePermission creates a permission associated with the client CreatePermissionTicket creates a permission ticket, using access token from client CreatePolicy creates a policy associated with the client CreateRealm creates a realm CreateRealmRole creates a role in a realm CreateResource creates a resource associated with the client, using access token from admin CreateResourceClient creates a resource associated with the client, using access token from client CreateResourcePolicy associates a permission with a specific resource, using token obtained by Resource Owner Password Credentials Grant or Token exchange CreateScope creates a scope associated with the client CreateUser creates the given user in the given realm and returns it's userID Note: Keycloak has not documented what members of the User object are actually being accepted, when creating a user. Things like RealmRoles must be attached using followup calls to the respective functions. CreateUserFederatedIdentity creates an user federated identity DecodeAccessToken decodes the accessToken DecodeAccessTokenCustomClaims decodes the accessToken and writes claims into the given claims DeleteAuthenticationExecution delete a single execution with the given ID DeleteAuthenticationFlow deletes a flow in a realm with the given ID DeleteClient deletes a given client DeleteClientProtocolMapper deletes a protocol mapper in client scope DeleteClientRepresentation deletes a given client representation. DeleteClientRole deletes a given role. DeleteClientRoleComposite deletes composites from a role DeleteClientRoleFromGroup removes a client role from from the group DeleteClientRoleFromUser adds client-level role mappings Deprecated: replaced by DeleteClientRolesFrom DeleteClientRolesFromUser adds client-level role mappings DeleteClientScope deletes the scope with the given id. DeleteClientScopeMappingsClientRoles deletes client-level roles from the client’s scope DeleteClientScopeMappingsRealmRoles deletes realm-level roles from the client’s scope DeleteClientScopeProtocolMapper deletes the given protocol mapper from the client scope DeleteClientScopesScopeMappingsClientRoles removes attachment of client roles from a client scope (not client's scope). DeleteClientScopesScopeMappingsRealmRoles deletes realm-level roles from the client-scope DeleteComponent deletes the component with the given id. DeleteCredentials deletes the given credential for a given user DeleteGroup deletes the group with the given groupID. DeleteIdentityProvider deletes the identity provider in a realm DeleteIdentityProviderMapper deletes an instance of an identity provider mapper associated with the given alias and mapper ID DeletePermission deletes a policy associated with the client DeletePolicy deletes a policy associated with the client DeleteRealm removes a realm DeleteRealmRole deletes a role in a realm by role's name DeleteRealmRoleComposite deletes a role from the composite. DeleteRealmRoleFromGroup deletes realm-level role mappings DeleteRealmRoleFromUser deletes realm-level role mappings DeleteRequiredAction updates a required action for a given realm DeleteResource deletes a resource associated with the client (using an admin token) DeleteResourceClient deletes a resource associated with the client (using a client token) DeleteResourcePolicy deletes a permission for a specific resource, using token obtained by Resource Owner Password Credentials Grant or Token exchange DeleteScope deletes a scope associated with the client DeleteUser delete a given user DeleteUserFederatedIdentity deletes an user federated identity DeleteUserFromGroup deletes given user from given group DeleteUserPermission revokes permissions according query parameters DisableAllCredentialsByType disables all credentials for a user of a specific type ExecuteActionsEmail executes an actions email ExportIDPPublicBrokerConfig exports the broker config for a given alias GetAdapterConfiguration returns a adapter configuration GetAuthenticationExecutions retrieves all executions of a given flow GetAuthenticationFlow get an authentication flow with the given ID GetAuthenticationFlows get all authentication flows from a realm GetAuthorizationPolicyAssociatedPolicies returns a client's associated policies of specific policy with the given policy id, using access token from admin GetAuthorizationPolicyResources returns a client's resources of specific policy with the given policy id, using access token from admin GetAuthorizationPolicyScopes returns a client's scopes of specific policy with the given policy id, using access token from admin GetAvailableClientRolesByGroupID returns all available roles to the given group GetAvailableClientRolesByUserID returns all available client roles to the given user GetAvailableRealmRolesByGroupID returns all available realm roles to the given group GetAvailableRealmRolesByUserID returns all available realm roles to the given user GetCerts fetches certificates for the given realm from the public /open-id-connect/certs endpoint GetClient returns a client GetClientManagementPermissions returns whether client Authorization permissions have been initialized or not and a reference to the managed permissions GetClientOfflineSessions returns offline sessions associated with the client GetClientRepresentation returns a client representation GetClientRole get a role for the given client in a realm by role name GetClientRoleByID gets role for the given client in realm using role ID GetClientRoles get all roles for the given client in realm GetClientRolesByGroupID returns all client roles assigned to the given group GetClientRolesByUserID returns all client roles assigned to the given user GetClientScope returns a clientscope GetClientScopeMappings returns all scope mappings for the client GetClientScopeMappingsClientRoles returns roles associated with a client’s scope GetClientScopeMappingsClientRolesAvailable returns available roles associated with a client’s scope GetClientScopeMappingsRealmRoles returns realm-level roles associated with the client’s scope GetClientScopeMappingsRealmRolesAvailable returns realm-level roles that are available to attach to this client’s scope GetClientScopeProtocolMapper returns a protocol mapper of a client scope GetClientScopeProtocolMappers returns all protocol mappers of a client scope GetClientScopes returns all client scopes GetClientScopesScopeMappingsClientRoles returns attached client roles for a specific client, for a client scope (not client's scope). GetClientScopesScopeMappingsClientRolesAvailable returns available (i.e. not attached via CreateClientScopesScopeMappingsClientRoles) client roles for a specific client, for a client scope (not client's scope). GetClientScopesScopeMappingsRealmRoles returns roles associated with a client-scope GetClientScopesScopeMappingsRealmRolesAvailable returns realm-level roles that are available to attach to this client scope GetClientSecret returns a client's secret GetClientServiceAccount retrieves the service account "user" for a client if enabled GetClientUserSessions returns user sessions associated with the client GetClients gets all clients in realm GetClientsDefaultScopes returns a list of the client's default scopes GetClientsOptionalScopes returns a list of the client's optional scopes GetComponent get exactly one component by ID GetComponents get all components in realm GetComponentsWithParams get all components in realm with query params GetCompositeClientRolesByGroupID returns all client roles and composite roles assigned to the given group GetCompositeClientRolesByRoleID returns all client composite roles associated with the given client role GetCompositeClientRolesByUserID returns all client roles and composite roles assigned to the given user GetCompositeRealmRoles returns all realm composite roles associated with the given realm role GetCompositeRealmRolesByGroupID returns all realm roles and composite roles assigned to the given group GetCompositeRealmRolesByRoleID returns all realm composite roles associated with the given client role GetCompositeRealmRolesByUserID returns all realm roles and composite roles assigned to the given user GetCompositeRolesByRoleID returns all realm composite roles associated with the given client role GetConfiguredUserStorageCredentialTypes returns credential types, which are provided by the user storage where user is stored GetCredentialRegistrators returns credentials registrators GetCredentials returns credentials available for a given user GetDefaultDefaultClientScopes returns a list of default realm default scopes GetDefaultGroups returns a list of default groups GetDefaultOptionalClientScopes returns a list of default realm optional scopes GetDependentPermissions returns a client's permission with the given policy id GetEvents returns events GetGroup get group with id in realm GetGroupByPath get group with path in realm GetGroupManagementPermissions returns whether group Authorization permissions have been initialized or not and a reference to the managed permissions GetGroupMembers get a list of users of group with id in realm GetGroups get all groups in realm GetGroupsByClientRole gets groups with specified roles assigned of given client within a realm GetGroupsByRole gets groups assigned with a specific role of a realm GetGroupsCount gets the groups count in the realm GetIdentityProvider gets the identity provider in a realm GetIdentityProviderMapper gets the mapper by id for the given identity provider alias in a realm GetIdentityProviderMapperByID gets the mapper of an identity provider GetIdentityProviderMappers returns list of mappers associated with an identity provider GetIdentityProviders returns list of identity providers in a realm GetIssuer gets the issuer of the given realm GetKeyStoreConfig get keystoreconfig of the realm GetPermission returns a client's permission with the given id GetPermissionResources returns a client's resource attached for the given permission id GetPermissionScope gets the permission scope associated with the client GetPermissionScopes returns a client's scopes configured for the given permission id GetPermissions returns permissions associated with the client GetPolicies returns policies associated with the client GetPolicy returns a client's policy with the given id GetRawUserInfo calls the UserInfo endpoint and returns a raw json object GetRealm returns top-level representation of the realm GetRealmRole returns a role from a realm by role's name GetRealmRoleByID returns a role from a realm by role's ID GetRealmRoles get all roles of the given realm. GetRealmRolesByGroupID returns all roles assigned to the given group GetRealmRolesByUserID returns all roles assigned to the given user GetRealms returns top-level representation of all realms GetRequest returns a request for calling endpoints. GetRequestWithBasicAuth returns a form data base request configured with basic auth. GetRequestWithBearerAuth returns a JSON base request configured with an auth token. GetRequestWithBearerAuthNoCache returns a JSON base request configured with an auth token and no-cache header. GetRequestWithBearerAuthXMLHeader returns an XML base request configured with an auth token. GetRequestingPartyPermissionDecision returns a requesting party permission decision granted by the server GetRequestingPartyPermissions returns a requesting party permissions granted by the server GetRequestingPartyToken returns a requesting party token with permissions granted by the server GetRequiredAction gets a required action for a given realm GetRequiredActions gets a list of required actions for a given realm GetResource returns a client's resource with the given id, using access token from admin GetResourceClient returns a client's resource with the given id, using access token from client GetResourcePolicies returns resources associated with the client, using token obtained by Resource Owner Password Credentials Grant or Token exchange GetResourcePolicy updates a permission for a specific resource, using token obtained by Resource Owner Password Credentials Grant or Token exchange GetResourceServer returns resource server settings. The access token must have the realm view_clients role on its service account to be allowed to call this endpoint. GetResources returns resources associated with the client, using access token from admin GetResourcesClient returns resources associated with the client, using access token from client GetRoleMappingByGroupID gets the role mappings by group GetRoleMappingByUserID gets the role mappings by user GetScope returns a client's scope with the given id GetScopes returns scopes associated with the client GetServerInfo fetches the server info. GetToken uses TokenOptions to fetch a token. GetUserBruteForceDetectionStatus fetches a user status regarding brute force protection GetUserByID fetches a user from the given realm with the given userID GetUserCount gets the user count in the realm GetUserFederatedIdentities gets all user federated identities GetUserGroups get all groups for user GetUserInfo calls the UserInfo endpoint GetUserOfflineSessionsForClient returns offline sessions associated with the user and client GetUserPermissions gets granted permissions according query parameters GetUserSessions returns user sessions associated with the user GetUsers get all users in realm GetUsersByClientRoleName returns all users have a given client role GetUsersByRoleName returns all users have a given role GrantUserPermission lets resource owner grant permission for specific resource ID to specific user ID ImportIdentityProviderConfig parses and returns the identity provider config at a given URL ImportIdentityProviderConfigFromFile parses and returns the identity provider config from a given file Login performs a login with user credentials and a client LoginAdmin performs a login with Admin client LoginClient performs a login with client credentials LoginClientSignedJWT performs a login with client credentials and signed jwt claims LoginClientTokenExchange will exchange the presented token for a user's token Requires Token-Exchange is enabled: https://www.keycloak.org/docs/latest/securing_apps/index.html#_token-exchange LoginOtp performs a login with user credentials and otp token Logout logs out users with refresh token LogoutAllSessions logs out all sessions of a user given an id. LogoutPublicClient performs a logout using a public client and the accessToken. LogoutUserSession logs out a single sessions of a user given a session id MoveCredentialBehind move a credential to a position behind another credential MoveCredentialToFirst move a credential to a first position in the credentials list of the user RefreshToken refreshes the given token. May return a *APIError with further details about the issue. RegenerateClientSecret triggers the creation of the new client secret. RegisterRequiredAction creates a required action for a given realm RemoveDefaultGroup removes group from the list of default groups RemoveDefaultScopeFromClient removes a client scope from the list of client's default scopes RemoveOptionalScopeFromClient deletes a client scope from the list of client's optional scopes RestyClient returns the internal resty g. This can be used to configure the g. RetrospectToken calls the openid-connect introspect endpoint RevokeToken revokes the passed token. The token can either be an access or refresh token. RevokeUserConsents revokes the given user consent. SendVerifyEmail sends a verification e-mail to a user. SetPassword sets a new password for the user with the given id. Needs elevated privileges SetRestyClient overwrites the internal resty g. UpdateAuthenticationExecution updates an authentication execution for the given flow in the given realm UpdateAuthenticationFlow a given Authentication Flow UpdateClient updates the given Client UpdateClientManagementPermissions updates the given client management permissions UpdateClientProtocolMapper updates a protocol mapper in client scope UpdateClientRepresentation updates the given client representation UpdateClientScope updates the given client scope. UpdateClientScopeProtocolMapper updates the given protocol mapper for a client scope UpdateComponent updates the given component UpdateCredentialUserLabel updates label for the given credential for the given user UpdateGroup updates the given group. UpdateGroupManagementPermissions updates the given group management permissions UpdateIdentityProvider updates the identity provider in a realm UpdateIdentityProviderMapper updates mapper of an identity provider UpdatePermission updates a permission associated with the client UpdatePermissionScope updates a permission scope associated with the client UpdatePolicy updates a policy associated with the client UpdateRealm updates a given realm UpdateRealmRole updates a role in a realm UpdateRealmRoleByID updates a role in a realm by role's ID UpdateRequiredAction updates a required action for a given realm UpdateResource updates a resource associated with the client, using access token from admin UpdateResourceClient updates a resource associated with the client, using access token from client UpdateResourcePolicy updates a permission for a specific resource, using token obtained by Resource Owner Password Credentials Grant or Token exchange UpdateRole updates the given role. UpdateScope updates a scope associated with the client UpdateUser updates a given user UpdateUserPermission updates user permissions. func NewClient(basePath string, options ...func(*GoCloak)) *GoCloak
Group is a Group Access *map[string]bool Attributes *map[string][]string ClientRoles *map[string][]string ID *string Name *string Path *string RealmRoles *[]string SubGroups *[]Group (*Group) String() string *Group : github.com/ChrisTrenkamp/goxpath/tree.Result *Group : fmt.Stringer func (*GoCloak).GetDefaultGroups(ctx context.Context, token, realm string) ([]*Group, error) func (*GoCloak).GetGroup(ctx context.Context, token, realm, groupID string) (*Group, error) func (*GoCloak).GetGroupByPath(ctx context.Context, token, realm, groupPath string) (*Group, error) func (*GoCloak).GetGroups(ctx context.Context, token, realm string, params GetGroupsParams) ([]*Group, error) func (*GoCloak).GetGroupsByClientRole(ctx context.Context, token, realm string, roleName string, clientID string) ([]*Group, error) func (*GoCloak).GetGroupsByRole(ctx context.Context, token, realm string, roleName string) ([]*Group, error) func (*GoCloak).GetUserGroups(ctx context.Context, token, realm, userID string, params GetGroupsParams) ([]*Group, error) func (*GoCloak).CreateChildGroup(ctx context.Context, token, realm, groupID string, group Group) (string, error) func (*GoCloak).CreateGroup(ctx context.Context, token, realm string, group Group) (string, error) func (*GoCloak).UpdateGroup(ctx context.Context, token, realm string, updatedGroup Group) error
GroupDefinition represents a group in a GroupPolicyRepresentation ExtendChildren *bool ID *string Path *string (*GroupDefinition) String() string *GroupDefinition : github.com/ChrisTrenkamp/goxpath/tree.Result *GroupDefinition : fmt.Stringer
GroupPolicyRepresentation represents group based policies Groups *[]GroupDefinition GroupsClaim *string (*GroupPolicyRepresentation) String() string *GroupPolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *GroupPolicyRepresentation : fmt.Stringer
GroupsCount represents the groups count response from keycloak Count int (*GroupsCount) String() string *GroupsCount : github.com/ChrisTrenkamp/goxpath/tree.Result *GroupsCount : fmt.Stringer
HTTPErrorResponse is a model of an error response Description string Error string Message string NotEmpty validates that error is not emptyp String returns a string representation of an error HTTPErrorResponse : github.com/ChrisTrenkamp/goxpath/tree.Result HTTPErrorResponse : fmt.Stringer
IdentityProviderMapper represents the body of a call to add a mapper to an identity provider Config *map[string]string ID *string IdentityProviderAlias *string IdentityProviderMapper *string Name *string func (*GoCloak).GetIdentityProviderMapper(ctx context.Context, token string, realm string, alias string, mapperID string) (*IdentityProviderMapper, error) func (*GoCloak).GetIdentityProviderMapperByID(ctx context.Context, token, realm, alias, mapperID string) (*IdentityProviderMapper, error) func (*GoCloak).GetIdentityProviderMappers(ctx context.Context, token, realm, alias string) ([]*IdentityProviderMapper, error) func (*GoCloak).CreateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (string, error) func (*GoCloak).UpdateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) error
IdentityProviderRepresentation represents an identity provider AddReadTokenRoleOnCreate *bool Alias *string Config *map[string]string DisplayName *string Enabled *bool FirstBrokerLoginFlowAlias *string InternalID *string LinkOnly *bool PostBrokerLoginFlowAlias *string ProviderID *string StoreToken *bool TrustEmail *bool (*IdentityProviderRepresentation) String() string *IdentityProviderRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *IdentityProviderRepresentation : fmt.Stringer func (*GoCloak).GetIdentityProvider(ctx context.Context, token, realm, alias string) (*IdentityProviderRepresentation, error) func (*GoCloak).GetIdentityProviders(ctx context.Context, token, realm string) ([]*IdentityProviderRepresentation, error) func (*GoCloak).CreateIdentityProvider(ctx context.Context, token string, realm string, providerRep IdentityProviderRepresentation) (string, error) func (*GoCloak).UpdateIdentityProvider(ctx context.Context, token, realm, alias string, providerRep IdentityProviderRepresentation) error
IntroSpectTokenResult is returned when a token was checked Active *bool Aud *StringOrArray AuthTime *int Exp *int Iat *int Jti *string Nbf *int Permissions *[]ResourcePermission Type *string (*IntroSpectTokenResult) String() string *IntroSpectTokenResult : github.com/ChrisTrenkamp/goxpath/tree.Result *IntroSpectTokenResult : fmt.Stringer func (*GoCloak).RetrospectToken(ctx context.Context, accessToken, clientID, clientSecret, realm string) (*IntroSpectTokenResult, error)
IssuerResponse is returned by the issuer endpoint AccountService *string PublicKey *string Realm *string TokenService *string TokensNotBefore *int (*IssuerResponse) String() string *IssuerResponse : github.com/ChrisTrenkamp/goxpath/tree.Result *IssuerResponse : fmt.Stringer func (*GoCloak).GetIssuer(ctx context.Context, realm string) (*IssuerResponse, error)
JSPolicyRepresentation represents js based policies Code *string (*JSPolicyRepresentation) String() string *JSPolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *JSPolicyRepresentation : fmt.Stringer
JWT is a JWT AccessToken string ExpiresIn int IDToken string NotBeforePolicy int RefreshExpiresIn int RefreshToken string Scope string SessionState string TokenType string func (*GoCloak).GetRequestingPartyToken(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*JWT, error) func (*GoCloak).GetToken(ctx context.Context, realm string, options TokenOptions) (*JWT, error) func (*GoCloak).Login(ctx context.Context, clientID, clientSecret, realm, username, password string) (*JWT, error) func (*GoCloak).LoginAdmin(ctx context.Context, username, password, realm string) (*JWT, error) func (*GoCloak).LoginClient(ctx context.Context, clientID, clientSecret, realm string, scopes ...string) (*JWT, error) func (*GoCloak).LoginClientSignedJWT(ctx context.Context, clientID, realm string, key interface{}, signedMethod jwt.SigningMethod, expiresAt *jwt.NumericDate) (*JWT, error) func (*GoCloak).LoginClientTokenExchange(ctx context.Context, clientID, token, clientSecret, realm, targetClient, userID string) (*JWT, error) func (*GoCloak).LoginOtp(ctx context.Context, clientID, clientSecret, realm, username, password, totp string) (*JWT, error) func (*GoCloak).RefreshToken(ctx context.Context, refreshToken, clientID, clientSecret, realm string) (*JWT, error)
Key is a key Algorithm *string Certificate *string Kid *string ProviderID *string ProviderPriority *int PublicKey *string Status *string Type *string (*Key) String() string *Key : github.com/ChrisTrenkamp/goxpath/tree.Result *Key : fmt.Stringer
KeyStoreConfig holds the keyStoreConfig ActiveKeys *ActiveKeys Key *[]Key (*KeyStoreConfig) String() string *KeyStoreConfig : github.com/ChrisTrenkamp/goxpath/tree.Result *KeyStoreConfig : fmt.Stringer func (*GoCloak).GetKeyStoreConfig(ctx context.Context, token, realm string) (*KeyStoreConfig, error)
Logic is an enum type for policy logic func LogicP(value Logic) *Logic func LogicP(value Logic) *Logic var NEGATIVE *Logic var POSITIVE *Logic
ManagementPermissionRepresentation is a representation of management permissions v18: https://www.keycloak.org/docs-api/18.0/rest-api/#_managementpermissionreference Enabled *bool Resource *string ScopePermissions *map[string]string func (*GoCloak).GetClientManagementPermissions(ctx context.Context, token, realm string, idOfClient string) (*ManagementPermissionRepresentation, error) func (*GoCloak).GetGroupManagementPermissions(ctx context.Context, token, realm string, idOfGroup string) (*ManagementPermissionRepresentation, error) func (*GoCloak).UpdateClientManagementPermissions(ctx context.Context, accessToken, realm string, idOfClient string, managementPermissions ManagementPermissionRepresentation) (*ManagementPermissionRepresentation, error) func (*GoCloak).UpdateGroupManagementPermissions(ctx context.Context, accessToken, realm string, idOfGroup string, managementPermissions ManagementPermissionRepresentation) (*ManagementPermissionRepresentation, error) func (*GoCloak).UpdateClientManagementPermissions(ctx context.Context, accessToken, realm string, idOfClient string, managementPermissions ManagementPermissionRepresentation) (*ManagementPermissionRepresentation, error) func (*GoCloak).UpdateGroupManagementPermissions(ctx context.Context, accessToken, realm string, idOfGroup string, managementPermissions ManagementPermissionRepresentation) (*ManagementPermissionRepresentation, error)
MappingsRepresentation is a representation of role mappings ClientMappings map[string]*ClientMappingsRepresentation RealmMappings *[]Role (*MappingsRepresentation) String() string *MappingsRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *MappingsRepresentation : fmt.Stringer func (*GoCloak).GetClientScopeMappings(ctx context.Context, token, realm, idOfClient string) (*MappingsRepresentation, error) func (*GoCloak).GetRoleMappingByGroupID(ctx context.Context, token, realm, groupID string) (*MappingsRepresentation, error) func (*GoCloak).GetRoleMappingByUserID(ctx context.Context, token, realm, userID string) (*MappingsRepresentation, error)
MemoryInfoRepresentation represents a memory info Free *int FreeFormated *string FreePercentage *int Total *int TotalFormated *string Used *int UsedFormated *string (*MemoryInfoRepresentation) String() string *MemoryInfoRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *MemoryInfoRepresentation : fmt.Stringer
ModifyAuthenticationExecutionRepresentation is the payload for updating an execution representation Alias *string AuthenticationConfig *string AuthenticationFlow *bool Configurable *bool Description *string DisplayName *string FlowID *string ID *string Index *int Level *int ProviderID *string Requirement *string RequirementChoices *[]string func (*GoCloak).GetAuthenticationExecutions(ctx context.Context, token, realm, flow string) ([]*ModifyAuthenticationExecutionRepresentation, error) func (*GoCloak).UpdateAuthenticationExecution(ctx context.Context, token, realm, flow string, execution ModifyAuthenticationExecutionRepresentation) error
MultiValuedHashMap represents something Empty *bool LoadFactor *float32 Threshold *int32 (*MultiValuedHashMap) String() string *MultiValuedHashMap : github.com/ChrisTrenkamp/goxpath/tree.Result *MultiValuedHashMap : fmt.Stringer
PasswordPolicy represents the configuration for a supported password policy ConfigType string DefaultValue string DisplayName string ID string MultipleSupported bool
PermissionGrantParams represents the permission which the resource owner is granting to a specific user Granted *bool RequesterID *string ResourceID *string ScopeName *string TicketID *string (*PermissionGrantParams) String() string *PermissionGrantParams : github.com/ChrisTrenkamp/goxpath/tree.Result *PermissionGrantParams : fmt.Stringer func (*GoCloak).GrantUserPermission(ctx context.Context, token, realm string, permission PermissionGrantParams) (*PermissionGrantResponseRepresentation, error) func (*GoCloak).UpdateUserPermission(ctx context.Context, token, realm string, permission PermissionGrantParams) (*PermissionGrantResponseRepresentation, error)
PermissionGrantResponseRepresentation represents the reply from Keycloack after granting permission Granted *bool ID *string Owner *string RequesterID *string ResourceID *string Scope *string (*PermissionGrantResponseRepresentation) String() string *PermissionGrantResponseRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *PermissionGrantResponseRepresentation : fmt.Stringer func (*GoCloak).GetUserPermissions(ctx context.Context, token, realm string, params GetUserPermissionParams) ([]*PermissionGrantResponseRepresentation, error) func (*GoCloak).GrantUserPermission(ctx context.Context, token, realm string, permission PermissionGrantParams) (*PermissionGrantResponseRepresentation, error) func (*GoCloak).UpdateUserPermission(ctx context.Context, token, realm string, permission PermissionGrantParams) (*PermissionGrantResponseRepresentation, error)
PermissionRepresentation is a representation of a RequestingPartyPermission DecisionStrategy *DecisionStrategy Description *string ID *string Logic *Logic Name *string Policies *[]string ResourceType *string Resources *[]string Scopes *[]string Type *string (*PermissionRepresentation) String() string *PermissionRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *PermissionRepresentation : fmt.Stringer func (*GoCloak).CreatePermission(ctx context.Context, token, realm, idOfClient string, permission PermissionRepresentation) (*PermissionRepresentation, error) func (*GoCloak).GetDependentPermissions(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PermissionRepresentation, error) func (*GoCloak).GetPermission(ctx context.Context, token, realm, idOfClient, permissionID string) (*PermissionRepresentation, error) func (*GoCloak).GetPermissions(ctx context.Context, token, realm, idOfClient string, params GetPermissionParams) ([]*PermissionRepresentation, error) func (*GoCloak).CreatePermission(ctx context.Context, token, realm, idOfClient string, permission PermissionRepresentation) (*PermissionRepresentation, error) func (*GoCloak).UpdatePermission(ctx context.Context, token, realm, idOfClient string, permission PermissionRepresentation) error
PermissionResource represents a resources asscoiated with a permission ResourceID *string ResourceName *string (*PermissionResource) String() string *PermissionResource : github.com/ChrisTrenkamp/goxpath/tree.Result *PermissionResource : fmt.Stringer func (*GoCloak).GetPermissionResources(ctx context.Context, token, realm, idOfClient, permissionID string) ([]*PermissionResource, error)
PermissionScope represents scopes associated with a permission ScopeID *string ScopeName *string (*PermissionScope) String() string *PermissionScope : github.com/ChrisTrenkamp/goxpath/tree.Result *PermissionScope : fmt.Stringer func (*GoCloak).GetPermissionScopes(ctx context.Context, token, realm, idOfClient, permissionID string) ([]*PermissionScope, error)
PermissionTicketDescriptionRepresentation represents the parameters returned along with a permission ticket Access *AccessRepresentation CreatedTimeStamp *int64 DisableCredentialTypes *[]string Email *string EmailVerified *bool Enabled *bool FirstName *string ID *string LastName *string NotBefore *int64 RequiredActions *[]string TOTP *bool UserName *string (*PermissionTicketDescriptionRepresentation) String() string *PermissionTicketDescriptionRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *PermissionTicketDescriptionRepresentation : fmt.Stringer
PermissionTicketPermissionRepresentation represents the individual permissions in a permission ticket RSID *string Scopes *[]string (*PermissionTicketPermissionRepresentation) String() string *PermissionTicketPermissionRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *PermissionTicketPermissionRepresentation : fmt.Stringer
PermissionTicketRepresentation represents the permission ticket contents AZP *string Claims *map[string][]string Permissions *[]PermissionTicketPermissionRepresentation StandardClaims jwt.StandardClaims StandardClaims.Audience string StandardClaims.ExpiresAt int64 StandardClaims.Id string StandardClaims.IssuedAt int64 StandardClaims.Issuer string StandardClaims.NotBefore int64 StandardClaims.Subject string (*PermissionTicketRepresentation) String() string Valid validates time based claims "exp, iat, nbf". There is no accounting for clock skew. As well, if any of the above claims are not in the token, it will still be considered a valid claim. VerifyAudience compares the aud claim against cmp. If required is false, this method will return true if the value matches or is unset VerifyExpiresAt compares the exp claim against cmp (cmp < exp). If req is false, it will return true, if exp is unset. VerifyIssuedAt compares the iat claim against cmp (cmp >= iat). If req is false, it will return true, if iat is unset. VerifyIssuer compares the iss claim against cmp. If required is false, this method will return true if the value matches or is unset VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf). If req is false, it will return true, if nbf is unset. *PermissionTicketRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result PermissionTicketRepresentation : github.com/golang-jwt/jwt/v4.Claims *PermissionTicketRepresentation : fmt.Stringer
PermissionTicketResponseRepresentation represents the keycloak response containing the permission ticket Ticket *string (*PermissionTicketResponseRepresentation) String() string *PermissionTicketResponseRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *PermissionTicketResponseRepresentation : fmt.Stringer func (*GoCloak).CreatePermissionTicket(ctx context.Context, token, realm string, permissions []CreatePermissionTicketParams) (*PermissionTicketResponseRepresentation, error)
PolicyEnforcementMode is an enum type for PolicyEnforcementMode of ResourceServerRepresentation func PolicyEnforcementModeP(value PolicyEnforcementMode) *PolicyEnforcementMode func PolicyEnforcementModeP(value PolicyEnforcementMode) *PolicyEnforcementMode var DISABLED *PolicyEnforcementMode var ENFORCING *PolicyEnforcementMode var PERMISSIVE *PolicyEnforcementMode
PolicyRepresentation is a representation of a Policy AggregatedPolicyRepresentation AggregatedPolicyRepresentation ClientPolicyRepresentation ClientPolicyRepresentation ClientPolicyRepresentation.Clients *[]string Config *map[string]string DecisionStrategy *DecisionStrategy Description *string GroupPolicyRepresentation GroupPolicyRepresentation GroupPolicyRepresentation.Groups *[]GroupDefinition GroupPolicyRepresentation.GroupsClaim *string ID *string JSPolicyRepresentation JSPolicyRepresentation JSPolicyRepresentation.Code *string Logic *Logic Name *string Owner *string Policies *[]string Resources *[]string RolePolicyRepresentation RolePolicyRepresentation RolePolicyRepresentation.Roles *[]RoleDefinition Scopes *[]string TimePolicyRepresentation TimePolicyRepresentation TimePolicyRepresentation.DayMonth *string TimePolicyRepresentation.DayMonthEnd *string TimePolicyRepresentation.Hour *string TimePolicyRepresentation.HourEnd *string TimePolicyRepresentation.Minute *string TimePolicyRepresentation.MinuteEnd *string TimePolicyRepresentation.Month *string TimePolicyRepresentation.MonthEnd *string TimePolicyRepresentation.NotBefore *string TimePolicyRepresentation.NotOnOrAfter *string TimePolicyRepresentation.Year *string TimePolicyRepresentation.YearEnd *string Type *string UserPolicyRepresentation UserPolicyRepresentation UserPolicyRepresentation.Users *[]string (*PolicyRepresentation) String() string *PolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *PolicyRepresentation : fmt.Stringer func (*GoCloak).CreatePolicy(ctx context.Context, token, realm, idOfClient string, policy PolicyRepresentation) (*PolicyRepresentation, error) func (*GoCloak).GetAuthorizationPolicyAssociatedPolicies(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyRepresentation, error) func (*GoCloak).GetPermissionScope(ctx context.Context, token, realm, idOfClient string, idOfScope string) (*PolicyRepresentation, error) func (*GoCloak).GetPolicies(ctx context.Context, token, realm, idOfClient string, params GetPolicyParams) ([]*PolicyRepresentation, error) func (*GoCloak).GetPolicy(ctx context.Context, token, realm, idOfClient, policyID string) (*PolicyRepresentation, error) func (*GoCloak).CreatePolicy(ctx context.Context, token, realm, idOfClient string, policy PolicyRepresentation) (*PolicyRepresentation, error) func (*GoCloak).UpdatePermissionScope(ctx context.Context, token, realm, idOfClient string, idOfScope string, policy PolicyRepresentation) error func (*GoCloak).UpdatePolicy(ctx context.Context, token, realm, idOfClient string, policy PolicyRepresentation) error
PolicyResourceRepresentation is a representation of a resource of specific policy ID *string Name *string func (*GoCloak).GetAuthorizationPolicyResources(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyResourceRepresentation, error)
PolicyScopeRepresentation is a representation of a scopes of specific policy ID *string Name *string func (*GoCloak).GetAuthorizationPolicyScopes(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyScopeRepresentation, error)
ProtocolMapperRepresentation represents.... Config *map[string]string ConsentRequired *bool ID *string Name *string Protocol *string ProtocolMapper *string (*ProtocolMapperRepresentation) String() string *ProtocolMapperRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ProtocolMapperRepresentation : fmt.Stringer func (*GoCloak).CreateClientProtocolMapper(ctx context.Context, token, realm, idOfClient string, mapper ProtocolMapperRepresentation) (string, error) func (*GoCloak).UpdateClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string, mapper ProtocolMapperRepresentation) error
ProtocolMappers are protocolmappers ConsentRequired *bool ID *string Name *string Protocol *string ProtocolMapper *string ProtocolMappersConfig *ProtocolMappersConfig (*ProtocolMappers) String() string *ProtocolMappers : github.com/ChrisTrenkamp/goxpath/tree.Result *ProtocolMappers : fmt.Stringer func (*GoCloak).GetClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, protocolMapperID string) (*ProtocolMappers, error) func (*GoCloak).GetClientScopeProtocolMappers(ctx context.Context, token, realm, scopeID string) ([]*ProtocolMappers, error) func (*GoCloak).CreateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, protocolMapper ProtocolMappers) (string, error) func (*GoCloak).UpdateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, protocolMapper ProtocolMappers) error
ProtocolMappersConfig is a config of a protocol mapper AccessTokenClaim *string AttributeName *string AttributeNameFormat *string ClaimName *string ClaimValue *string FullPath *string IDTokenClaim *string IncludedClientAudience *string JSONTypeLabel *string Multivalued *string Script *string Single *string UserAttribute *string UserinfoTokenClaim *string UsermodelClientRoleMappingClientID *string (*ProtocolMappersConfig) String() string *ProtocolMappersConfig : github.com/ChrisTrenkamp/goxpath/tree.Result *ProtocolMappersConfig : fmt.Stringer
ProtocolMapperType represents a type of protocol mapper Category string HelpText string ID string Name string Priority int Properties []ProtocolMapperTypeProperty
ProtocolMapperTypeProperty represents a property of a ProtocolMapperType DefaultValue EnforcedString HelpText string Label string Name string Options []string ReadOnly bool Secret bool Type string
ProtocolMapperTypes holds the currently available ProtocolMapperType-s grouped by protocol DockerV2 []ProtocolMapperType OpenIDConnect []ProtocolMapperType SAML []ProtocolMapperType
RealmRepresentation represents a realm AccessCodeLifespan *int AccessCodeLifespanLogin *int AccessCodeLifespanUserAction *int AccessTokenLifespan *int AccessTokenLifespanForImplicitFlow *int AccountTheme *string ActionTokenGeneratedByAdminLifespan *int ActionTokenGeneratedByUserLifespan *int AdminEventsDetailsEnabled *bool AdminEventsEnabled *bool AdminTheme *string Attributes *map[string]string AuthenticationFlows *[]interface{} AuthenticatorConfig *[]interface{} BrowserFlow *string BrowserSecurityHeaders *map[string]string BruteForceProtected *bool ClientAuthenticationFlow *string ClientPolicies *map[string][]interface{} ClientProfiles *map[string][]interface{} ClientScopeMappings *map[string][]interface{} ClientScopes *[]ClientScope Clients *[]Client Components interface{} DefaultDefaultClientScopes *[]string DefaultGroups *[]string DefaultLocale *string DefaultOptionalClientScopes *[]string DefaultRole *Role DefaultRoles *[]string DefaultSignatureAlgorithm *string DirectGrantFlow *string DisplayName *string DisplayNameHTML *string DockerAuthenticationFlow *string DuplicateEmailsAllowed *bool EditUsernameAllowed *bool EmailTheme *string Enabled *bool EnabledEventTypes *[]string EventsEnabled *bool EventsExpiration *int64 EventsListeners *[]string FailureFactor *int FederatedUsers *[]interface{} Groups *[]interface{} ID *string IdentityProviderMappers *[]interface{} IdentityProviders *[]interface{} InternationalizationEnabled *bool KeycloakVersion *string LoginTheme *string LoginWithEmailAllowed *bool MaxDeltaTimeSeconds *int MaxFailureWaitSeconds *int MinimumQuickLoginWaitSeconds *int NotBefore *int OfflineSessionIdleTimeout *int OfflineSessionMaxLifespan *int OfflineSessionMaxLifespanEnabled *bool OtpPolicyAlgorithm *string OtpPolicyDigits *int OtpPolicyInitialCounter *int OtpPolicyLookAheadWindow *int OtpPolicyPeriod *int OtpPolicyType *string OtpSupportedApplications *[]string PasswordPolicy *string PermanentLockout *bool ProtocolMappers *[]interface{} QuickLoginCheckMilliSeconds *int64 Realm *string RefreshTokenMaxReuse *int RegistrationAllowed *bool RegistrationEmailAsUsername *bool RegistrationFlow *string RememberMe *bool RequiredActions *[]interface{} ResetCredentialsFlow *string ResetPasswordAllowed *bool RevokeRefreshToken *bool Roles *RolesRepresentation SMTPServer *map[string]string ScopeMappings *[]interface{} SslRequired *string SsoSessionIdleTimeout *int SsoSessionIdleTimeoutRememberMe *int SsoSessionMaxLifespan *int SsoSessionMaxLifespanRememberMe *int SupportedLocales *[]string UserFederationMappers *[]interface{} UserFederationProviders *[]interface{} UserManagedAccessAllowed *bool Users *[]User VerifyEmail *bool WaitIncrementSeconds *int WebAuthnPolicyAcceptableAaguids *[]string WebAuthnPolicyAttestationConveyancePreference *string WebAuthnPolicyAuthenticatorAttachment *string WebAuthnPolicyAvoidSameAuthenticatorRegister *bool WebAuthnPolicyCreateTimeout *int WebAuthnPolicyPasswordlessAcceptableAaguids *[]string WebAuthnPolicyPasswordlessAttestationConveyancePreference *string WebAuthnPolicyPasswordlessAuthenticatorAttachment *string WebAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister *bool WebAuthnPolicyPasswordlessCreateTimeout *int WebAuthnPolicyPasswordlessRequireResidentKey *string WebAuthnPolicyPasswordlessRpEntityName *string WebAuthnPolicyPasswordlessRpID *string WebAuthnPolicyPasswordlessSignatureAlgorithms *[]string WebAuthnPolicyPasswordlessUserVerificationRequirement *string WebAuthnPolicyRequireResidentKey *string WebAuthnPolicyRpEntityName *string WebAuthnPolicyRpID *string WebAuthnPolicySignatureAlgorithms *[]string WebAuthnPolicyUserVerificationRequirement *string (*RealmRepresentation) String() string *RealmRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *RealmRepresentation : fmt.Stringer func (*GoCloak).GetRealm(ctx context.Context, token, realm string) (*RealmRepresentation, error) func (*GoCloak).GetRealms(ctx context.Context, token string) ([]*RealmRepresentation, error) func (*GoCloak).CreateRealm(ctx context.Context, token string, realm RealmRepresentation) (string, error) func (*GoCloak).UpdateRealm(ctx context.Context, token string, realm RealmRepresentation) error
RequestingPartyPermission is returned by request party token with response type set to "permissions" Claims *map[string]string ResourceID *string ResourceName *string Scopes *[]string (*RequestingPartyPermission) String() string *RequestingPartyPermission : github.com/ChrisTrenkamp/goxpath/tree.Result *RequestingPartyPermission : fmt.Stringer func (*GoCloak).GetRequestingPartyPermissions(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*[]RequestingPartyPermission, error)
RequestingPartyPermissionDecision is returned by request party token with response type set to "decision" Result *bool func (*GoCloak).GetRequestingPartyPermissionDecision(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*RequestingPartyPermissionDecision, error)
RequestingPartyTokenOptions represents the options to obtain a requesting party token Audience *string ClaimToken *string ClaimTokenFormat *string GrantType *string Permissions *[]string RPT *string ResponseIncludeResourceName *bool ResponseMode *string ResponsePermissionsLimit *uint32 SubjectToken *string SubmitRequest *bool Ticket *string FormData returns a map of options to be used in SetFormData function (*RequestingPartyTokenOptions) String() string *RequestingPartyTokenOptions : github.com/ChrisTrenkamp/goxpath/tree.Result *RequestingPartyTokenOptions : fmt.Stringer func (*GoCloak).GetRequestingPartyPermissionDecision(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*RequestingPartyPermissionDecision, error) func (*GoCloak).GetRequestingPartyPermissions(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*[]RequestingPartyPermission, error) func (*GoCloak).GetRequestingPartyToken(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*JWT, error)
RequiredActionProviderRepresentation is a representation of required actions v15: https://www.keycloak.org/docs-api/15.0/rest-api/index.html#_requiredactionproviderrepresentation Alias *string Config *map[string]string DefaultAction *bool Enabled *bool Name *string Priority *int32 ProviderID *string (*RequiredActionProviderRepresentation) String() string *RequiredActionProviderRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *RequiredActionProviderRepresentation : fmt.Stringer func (*GoCloak).GetRequiredAction(ctx context.Context, token string, realm string, alias string) (*RequiredActionProviderRepresentation, error) func (*GoCloak).GetRequiredActions(ctx context.Context, token string, realm string) ([]*RequiredActionProviderRepresentation, error) func (*GoCloak).RegisterRequiredAction(ctx context.Context, token string, realm string, requiredAction RequiredActionProviderRepresentation) error func (*GoCloak).UpdateRequiredAction(ctx context.Context, token string, realm string, requiredAction RequiredActionProviderRepresentation) error
ResourceOwnerRepresentation represents a resource's owner ID *string Name *string (*ResourceOwnerRepresentation) String() string *ResourceOwnerRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ResourceOwnerRepresentation : fmt.Stringer
ResourcePermission represents a permission granted to a resource RSID *string RSName *string ResourceID *string ResourceScopes *[]string Scopes *[]string (*ResourcePermission) String() string *ResourcePermission : github.com/ChrisTrenkamp/goxpath/tree.Result *ResourcePermission : fmt.Stringer
ResourcePolicyRepresentation is a representation of a Policy applied to a resource Clients *[]string DecisionStrategy *DecisionStrategy Description *string Groups *[]string ID *string Logic *Logic Name *string Owner *string Roles *[]string Scopes *[]string Type *string Users *[]string (*ResourcePolicyRepresentation) String() string *ResourcePolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ResourcePolicyRepresentation : fmt.Stringer func (*GoCloak).CreateResourcePolicy(ctx context.Context, token, realm, resourceID string, policy ResourcePolicyRepresentation) (*ResourcePolicyRepresentation, error) func (*GoCloak).GetResourcePolicies(ctx context.Context, token, realm string, params GetResourcePoliciesParams) ([]*ResourcePolicyRepresentation, error) func (*GoCloak).GetResourcePolicy(ctx context.Context, token, realm, permissionID string) (*ResourcePolicyRepresentation, error) func (*GoCloak).CreateResourcePolicy(ctx context.Context, token, realm, resourceID string, policy ResourcePolicyRepresentation) (*ResourcePolicyRepresentation, error) func (*GoCloak).UpdateResourcePolicy(ctx context.Context, token, realm, permissionID string, policy ResourcePolicyRepresentation) error
ResourceRepresentation is a representation of a Resource Attributes *map[string][]string DisplayName *string // TODO: is marked "_optional" in template, input error or deliberate? // TODO: With "_" because that's how it's written down in the template Name *string Owner *ResourceOwnerRepresentation OwnerManagedAccess *bool ResourceScopes *[]ScopeRepresentation Scopes *[]ScopeRepresentation Type *string URIs *[]string (*ResourceRepresentation) String() string *ResourceRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ResourceRepresentation : fmt.Stringer func (*GoCloak).CreateResource(ctx context.Context, token, realm string, idOfClient string, resource ResourceRepresentation) (*ResourceRepresentation, error) func (*GoCloak).CreateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) (*ResourceRepresentation, error) func (*GoCloak).GetResource(ctx context.Context, token, realm, idOfClient, resourceID string) (*ResourceRepresentation, error) func (*GoCloak).GetResourceClient(ctx context.Context, token, realm, resourceID string) (*ResourceRepresentation, error) func (*GoCloak).GetResources(ctx context.Context, token, realm, idOfClient string, params GetResourceParams) ([]*ResourceRepresentation, error) func (*GoCloak).GetResourcesClient(ctx context.Context, token, realm string, params GetResourceParams) ([]*ResourceRepresentation, error) func (*GoCloak).CreateResource(ctx context.Context, token, realm string, idOfClient string, resource ResourceRepresentation) (*ResourceRepresentation, error) func (*GoCloak).CreateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) (*ResourceRepresentation, error) func (*GoCloak).UpdateResource(ctx context.Context, token, realm, idOfClient string, resource ResourceRepresentation) error func (*GoCloak).UpdateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) error
ResourceServerRepresentation represents the resources of a Server AllowRemoteResourceManagement *bool ClientID *string DecisionStrategy *DecisionStrategy ID *string Name *string Policies *[]PolicyRepresentation PolicyEnforcementMode *PolicyEnforcementMode Resources *[]ResourceRepresentation Scopes *[]ScopeRepresentation (*ResourceServerRepresentation) String() string *ResourceServerRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ResourceServerRepresentation : fmt.Stringer func (*GoCloak).GetResourceServer(ctx context.Context, token, realm, idOfClient string) (*ResourceServerRepresentation, error)
Role is a role Attributes *map[string][]string ClientRole *bool Composite *bool Composites *CompositesRepresentation ContainerID *string Description *string ID *string Name *string ScopeParamRequired *bool (*Role) String() string *Role : github.com/ChrisTrenkamp/goxpath/tree.Result *Role : fmt.Stringer func (*GoCloak).GetAvailableClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) ([]*Role, error) func (*GoCloak).GetAvailableClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) ([]*Role, error) func (*GoCloak).GetAvailableRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) ([]*Role, error) func (*GoCloak).GetAvailableRealmRolesByUserID(ctx context.Context, token, realm, userID string) ([]*Role, error) func (*GoCloak).GetClientRole(ctx context.Context, token, realm, idOfClient, roleName string) (*Role, error) func (*GoCloak).GetClientRoleByID(ctx context.Context, token, realm, roleID string) (*Role, error) func (*GoCloak).GetClientRoles(ctx context.Context, token, realm, idOfClient string, params GetRoleParams) ([]*Role, error) func (*GoCloak).GetClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) ([]*Role, error) func (*GoCloak).GetClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) ([]*Role, error) func (*GoCloak).GetClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string) ([]*Role, error) func (*GoCloak).GetClientScopeMappingsClientRolesAvailable(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string) ([]*Role, error) func (*GoCloak).GetClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string) ([]*Role, error) func (*GoCloak).GetClientScopeMappingsRealmRolesAvailable(ctx context.Context, token, realm, idOfClient string) ([]*Role, error) func (*GoCloak).GetClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string) ([]*Role, error) func (*GoCloak).GetClientScopesScopeMappingsClientRolesAvailable(ctx context.Context, token, realm, idOfClientScope, idOfClient string) ([]*Role, error) func (*GoCloak).GetClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string) ([]*Role, error) func (*GoCloak).GetClientScopesScopeMappingsRealmRolesAvailable(ctx context.Context, token, realm, clientScopeID string) ([]*Role, error) func (*GoCloak).GetCompositeClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) ([]*Role, error) func (*GoCloak).GetCompositeClientRolesByRoleID(ctx context.Context, token, realm, idOfClient, roleID string) ([]*Role, error) func (*GoCloak).GetCompositeClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) ([]*Role, error) func (*GoCloak).GetCompositeRealmRoles(ctx context.Context, token, realm, roleName string) ([]*Role, error) func (*GoCloak).GetCompositeRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) ([]*Role, error) func (*GoCloak).GetCompositeRealmRolesByRoleID(ctx context.Context, token, realm, roleID string) ([]*Role, error) func (*GoCloak).GetCompositeRealmRolesByUserID(ctx context.Context, token, realm, userID string) ([]*Role, error) func (*GoCloak).GetCompositeRolesByRoleID(ctx context.Context, token, realm, roleID string) ([]*Role, error) func (*GoCloak).GetRealmRole(ctx context.Context, token, realm, roleName string) (*Role, error) func (*GoCloak).GetRealmRoleByID(ctx context.Context, token, realm, roleID string) (*Role, error) func (*GoCloak).GetRealmRoles(ctx context.Context, token, realm string, params GetRoleParams) ([]*Role, error) func (*GoCloak).GetRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) ([]*Role, error) func (*GoCloak).GetRealmRolesByUserID(ctx context.Context, token, realm, userID string) ([]*Role, error) func (*GoCloak).AddClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) error func (*GoCloak).AddClientRolesToGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) error func (*GoCloak).AddClientRolesToUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error func (*GoCloak).AddClientRoleToGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) error func (*GoCloak).AddClientRoleToUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error func (*GoCloak).AddRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) error func (*GoCloak).AddRealmRoleToGroup(ctx context.Context, token, realm, groupID string, roles []Role) error func (*GoCloak).AddRealmRoleToUser(ctx context.Context, token, realm, userID string, roles []Role) error func (*GoCloak).CreateClientRole(ctx context.Context, token, realm, idOfClient string, role Role) (string, error) func (*GoCloak).CreateClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, roles []Role) error func (*GoCloak).CreateClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) error func (*GoCloak).CreateClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string, roles []Role) error func (*GoCloak).CreateClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) error func (*GoCloak).CreateRealmRole(ctx context.Context, token string, realm string, role Role) (string, error) func (*GoCloak).DeleteClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) error func (*GoCloak).DeleteClientRoleFromGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) error func (*GoCloak).DeleteClientRoleFromUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error func (*GoCloak).DeleteClientRolesFromUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error func (*GoCloak).DeleteClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, roles []Role) error func (*GoCloak).DeleteClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) error func (*GoCloak).DeleteClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string, roles []Role) error func (*GoCloak).DeleteClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) error func (*GoCloak).DeleteRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) error func (*GoCloak).DeleteRealmRoleFromGroup(ctx context.Context, token, realm, groupID string, roles []Role) error func (*GoCloak).DeleteRealmRoleFromUser(ctx context.Context, token, realm, userID string, roles []Role) error func (*GoCloak).UpdateRealmRole(ctx context.Context, token, realm, roleName string, role Role) error func (*GoCloak).UpdateRealmRoleByID(ctx context.Context, token, realm, roleID string, role Role) error func (*GoCloak).UpdateRole(ctx context.Context, token, realm, idOfClient string, role Role) error
RoleDefinition represents a role in a RolePolicyRepresentation ID *string Private *bool Required *bool (*RoleDefinition) String() string *RoleDefinition : github.com/ChrisTrenkamp/goxpath/tree.Result *RoleDefinition : fmt.Stringer
RolePolicyRepresentation represents role based policies Roles *[]RoleDefinition (*RolePolicyRepresentation) String() string *RolePolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *RolePolicyRepresentation : fmt.Stringer
RolesRepresentation represents the roles of a realm Client *map[string][]Role Realm *[]Role (*RolesRepresentation) String() string *RolesRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *RolesRepresentation : fmt.Stringer
ScopeRepresentation is a represents a Scope DisplayName *string ID *string IconURI *string Name *string Policies *[]PolicyRepresentation Resources *[]ResourceRepresentation (*ScopeRepresentation) String() string *ScopeRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ScopeRepresentation : fmt.Stringer func (*GoCloak).CreateScope(ctx context.Context, token, realm, idOfClient string, scope ScopeRepresentation) (*ScopeRepresentation, error) func (*GoCloak).GetScope(ctx context.Context, token, realm, idOfClient, scopeID string) (*ScopeRepresentation, error) func (*GoCloak).GetScopes(ctx context.Context, token, realm, idOfClient string, params GetScopeParams) ([]*ScopeRepresentation, error) func (*GoCloak).CreateScope(ctx context.Context, token, realm, idOfClient string, scope ScopeRepresentation) (*ScopeRepresentation, error) func (*GoCloak).UpdateScope(ctx context.Context, token, realm, idOfClient string, scope ScopeRepresentation) error
SendVerificationMailParams is being used to send verification params ClientID *string RedirectURI *string func (*GoCloak).SendVerifyEmail(ctx context.Context, token, userID, realm string, params ...SendVerificationMailParams) error
ServerInfoRepresentation represents a server info BuiltinProtocolMappers *BuiltinProtocolMappers MemoryInfo *MemoryInfoRepresentation PasswordPolicies []*PasswordPolicy ProtocolMapperTypes *ProtocolMapperTypes SystemInfo *SystemInfoRepresentation Themes *Themes (*ServerInfoRepresentation) String() string *ServerInfoRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *ServerInfoRepresentation : fmt.Stringer func (*GoCloak).GetServerInfo(ctx context.Context, accessToken string) (*ServerInfoRepresentation, error)
SetPasswordRequest sets a new password Password *string Temporary *bool Type *string (*SetPasswordRequest) String() string *SetPasswordRequest : github.com/ChrisTrenkamp/goxpath/tree.Result *SetPasswordRequest : fmt.Stringer
StringOrArray represents a value that can either be a string or an array of strings MarshalJSON converts the array of strings to a JSON array or JSON string if there is only one item in the array UnmarshalJSON unmarshals a string or an array object from a JSON array or a JSON string *StringOrArray : encoding/json.Marshaler *StringOrArray : encoding/json.Unmarshaler
SystemInfoRepresentation represents a system info FileEncoding *string JavaHome *string JavaRuntime *string JavaVM *string JavaVMVersion *string JavaVendor *string JavaVersion *string OSArchitecture *string OSName *string OSVersion *string ServerTime *string Uptime *string UptimeMillis *int UserDir *string UserLocale *string UserName *string UserTimezone *string Version *string (*SystemInfoRepresentation) String() string *SystemInfoRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *SystemInfoRepresentation : fmt.Stringer
ThemeRepresentation contains the theme name and locales Locales []string Name string
Themes contains the available keycloak themes with locales Accounts []ThemeRepresentation Admin []ThemeRepresentation Common []ThemeRepresentation Email []ThemeRepresentation Login []ThemeRepresentation Welcome []ThemeRepresentation
TimePolicyRepresentation represents time based policies DayMonth *string DayMonthEnd *string Hour *string HourEnd *string Minute *string MinuteEnd *string Month *string MonthEnd *string NotBefore *string NotOnOrAfter *string Year *string YearEnd *string (*TimePolicyRepresentation) String() string *TimePolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *TimePolicyRepresentation : fmt.Stringer
TokenOptions represents the options to obtain a token Audience *string ClientAssertion *string ClientAssertionType *string ClientID *string ClientSecret *string Code *string GrantType *string Password *string Permission *string RedirectURI *string RefreshToken *string RequestedSubject *string RequestedTokenType *string ResponseType *string ResponseTypes *[]string Scope *string Scopes *[]string SubjectToken *string Totp *string Username *string FormData returns a map of options to be used in SetFormData function (*TokenOptions) String() string *TokenOptions : github.com/ChrisTrenkamp/goxpath/tree.Result *TokenOptions : fmt.Stringer func (*GoCloak).GetToken(ctx context.Context, realm string, options TokenOptions) (*JWT, error)
User represents the Keycloak User Structure Access *map[string]bool Attributes *map[string][]string ClientRoles *map[string][]string CreatedTimestamp *int64 Credentials *[]CredentialRepresentation DisableableCredentialTypes *[]interface{} Email *string EmailVerified *bool Enabled *bool FederationLink *string FirstName *string Groups *[]string ID *string LastName *string RealmRoles *[]string RequiredActions *[]string ServiceAccountClientID *string Totp *bool Username *string (*User) String() string *User : github.com/ChrisTrenkamp/goxpath/tree.Result *User : fmt.Stringer func (*GoCloak).GetClientServiceAccount(ctx context.Context, token, realm, idOfClient string) (*User, error) func (*GoCloak).GetGroupMembers(ctx context.Context, token, realm, groupID string, params GetGroupsParams) ([]*User, error) func (*GoCloak).GetUserByID(ctx context.Context, accessToken, realm, userID string) (*User, error) func (*GoCloak).GetUsers(ctx context.Context, token, realm string, params GetUsersParams) ([]*User, error) func (*GoCloak).GetUsersByClientRoleName(ctx context.Context, token, realm, idOfClient, roleName string, params GetUsersByRoleParams) ([]*User, error) func (*GoCloak).GetUsersByRoleName(ctx context.Context, token, realm, roleName string, params GetUsersByRoleParams) ([]*User, error) func (*GoCloak).CreateUser(ctx context.Context, token, realm string, user User) (string, error) func (*GoCloak).UpdateUser(ctx context.Context, token, realm string, user User) error
UserGroup is a UserGroup ID *string Name *string Path *string (*UserGroup) String() string *UserGroup : github.com/ChrisTrenkamp/goxpath/tree.Result *UserGroup : fmt.Stringer
UserInfo is returned by the userinfo endpoint https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims Address *UserInfoAddress Email *string EmailVerified *bool FamilyName *string Gender *string GivenName *string Locale *string MiddleName *string Name *string Nickname *string PhoneNumber *string PhoneNumberVerified *bool Picture *string PreferredUsername *string Profile *string Sub *string UpdatedAt *int Website *string ZoneInfo *string (*UserInfo) String() string *UserInfo : github.com/ChrisTrenkamp/goxpath/tree.Result *UserInfo : fmt.Stringer func (*GoCloak).GetUserInfo(ctx context.Context, accessToken, realm string) (*UserInfo, error)
UserInfoAddress is representation of the address sub-filed of UserInfo https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim Country *string Formatted *string Locality *string PostalCode *string Region *string StreetAddress *string (*UserInfoAddress) String() string *UserInfoAddress : github.com/ChrisTrenkamp/goxpath/tree.Result *UserInfoAddress : fmt.Stringer
UserPolicyRepresentation represents user based policies Users *[]string (*UserPolicyRepresentation) String() string *UserPolicyRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *UserPolicyRepresentation : fmt.Stringer
UserSessionRepresentation represents a list of user's sessions Clients *map[string]string ID *string IPAddress *string LastAccess *int64 Start *int64 UserID *string Username *string (*UserSessionRepresentation) String() string *UserSessionRepresentation : github.com/ChrisTrenkamp/goxpath/tree.Result *UserSessionRepresentation : fmt.Stringer func (*GoCloak).GetClientOfflineSessions(ctx context.Context, token, realm, idOfClient string, params ...GetClientUserSessionsParams) ([]*UserSessionRepresentation, error) func (*GoCloak).GetClientUserSessions(ctx context.Context, token, realm, idOfClient string, params ...GetClientUserSessionsParams) ([]*UserSessionRepresentation, error) func (*GoCloak).GetUserOfflineSessionsForClient(ctx context.Context, token, realm, userID, idOfClient string) ([]*UserSessionRepresentation, error) func (*GoCloak).GetUserSessions(ctx context.Context, token, realm, userID string) ([]*UserSessionRepresentation, error)
Package-Level Functions (total 34)
BoolP returns a pointer of a boolean variable
DecisionStrategyP returns a pointer for a DecisionStrategy value
Float32P returns a pointer of a float32 variable
Float64P returns a pointer of a float64 variable
GetQueryParams converts the struct to map[string]string The fields tags must have `json:"<name>,string,omitempty"` format for all types, except strings The string fields must have: `json:"<name>,omitempty"`. The `json:"<name>,string,omitempty"` tag for string field will add additional double quotes. "string" tag allows to convert the non-string fields of a structure to map[string]string. "omitempty" allows to skip the fields with default values.
Int32P returns a pointer of an int32 variable
Int64P returns a pointer of an int64 variable
IntP returns a pointer of an integer variable
LogicP returns a pointer for a Logic value
NewClient creates a new Client
NilOrEmpty returns true if string is empty or has a nil value
NilOrEmptyArray returns true if string is empty or has a nil value
NilOrEmptySlice returns true if list is empty or has a nil value
ParseAPIErrType is a convenience method for returning strongly typed API errors.
PBool returns a boolean value from a pointer
PFloat32 returns an flaot32 value from a pointer
PFloat64 returns an flaot64 value from a pointer
PInt returns an integer value from a pointer
PInt32 returns an int32 value from a pointer
PInt64 returns an int64 value from a pointer
PolicyEnforcementModeP returns a pointer for a PolicyEnforcementMode value
PString returns a string value from a pointer
PStringSlice converts a pointer to []string or returns ampty slice if nill value
SetAuthAdminRealms sets the auth admin realm
SetAuthRealms sets the auth realm
SetCertCacheInvalidationTime sets the logout
SetLegacyWildFlySupport maintain legacy WildFly support.
SetLogoutEndpoint sets the logout
SetOpenIDConnectEndpoint sets the logout
SetRevokeEndpoint sets the revoke endpoint
SetTokenEndpoint sets the token endpoint
StringP returns a pointer of a string variable
UserAttributeContains checks if the given attribute value is set
WithTracer generates a context that has a tracer attached
Package-Level Variables (total 8)
DecisionStrategy values
DecisionStrategy values
PolicyEnforcementMode values
PolicyEnforcementMode values
Logic values
PolicyEnforcementMode values
Logic values
DecisionStrategy values
Package-Level Constants (total 2)
APIErrTypeInvalidGrant corresponds with Keycloak's OAuthErrorException due to "invalid_grant".
APIErrTypeUnknown is for API errors that are not strongly typed.